package org.uim.cricket.storage.raise;

import org.uim.cricket.db.impl.ExistSeries;
import org.uim.cricket.entities.match.CricketMatch;
import org.uim.cricket.entities.match.SeriesPlayed;
import org.uim.cricket.storage.Dlogger;
import org.uim.cricket.storage.StorageBeans;

public class CheckForSeries {

	public String raiseSeries(CricketMatch match, SeriesPlayed s) throws Exception {
		ExistSeries exist = new ExistSeries(s.getId());
		boolean isexist = exist.exists();
		if (!isexist) {
			Dlogger.debug("  [New Series]: #" + s.getId() + " - " + s.getName());
			return new InsertNewSeries(StorageBeans.getInstance().fetchResObj(), match, s).raise();
		}
		return "";
	}
	
}
